package com.ruoyi.supplier.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supplier.mapper.TbReportInFlowMapper;
import com.ruoyi.supplier.domain.TbReportInFlow;
import com.ruoyi.supplier.service.ITbReportInFlowService;

/**
 * 每日营业进账流水Service业务层处理
 * 
 * @author oliver.li
 * @date 2021-08-14
 */
@Service
public class TbReportInFlowServiceImpl implements ITbReportInFlowService 
{
    @Autowired
    private TbReportInFlowMapper tbReportInFlowMapper;

    /**
     * 查询每日营业进账流水
     * 
     * @param id 每日营业进账流水ID
     * @return 每日营业进账流水
     */
    @Override
    public TbReportInFlow selectTbReportInFlowById(Long id)
    {
        return tbReportInFlowMapper.selectTbReportInFlowById(id);
    }

    /**
     * 查询每日营业进账流水列表
     * 
     * @param tbReportInFlow 每日营业进账流水
     * @return 每日营业进账流水
     */
    @Override
    public List<TbReportInFlow> selectTbReportInFlowList(TbReportInFlow tbReportInFlow)
    {
        return tbReportInFlowMapper.selectTbReportInFlowList(tbReportInFlow);
    }

    /**
     * 新增每日营业进账流水
     * 
     * @param tbReportInFlow 每日营业进账流水
     * @return 结果
     */
    @Override
    public int insertTbReportInFlow(TbReportInFlow tbReportInFlow)
    {
        tbReportInFlow.setCreateTime(DateUtils.getNowDate());
        return tbReportInFlowMapper.insertTbReportInFlow(tbReportInFlow);
    }

    /**
     * 修改每日营业进账流水
     * 
     * @param tbReportInFlow 每日营业进账流水
     * @return 结果
     */
    @Override
    public int updateTbReportInFlow(TbReportInFlow tbReportInFlow)
    {
        tbReportInFlow.setUpdateTime(DateUtils.getNowDate());
        return tbReportInFlowMapper.updateTbReportInFlow(tbReportInFlow);
    }

    /**
     * 批量删除每日营业进账流水
     * 
     * @param ids 需要删除的每日营业进账流水ID
     * @return 结果
     */
    @Override
    public int deleteTbReportInFlowByIds(Long[] ids)
    {
        return tbReportInFlowMapper.deleteTbReportInFlowByIds(ids);
    }

    /**
     * 删除每日营业进账流水信息
     * 
     * @param id 每日营业进账流水ID
     * @return 结果
     */
    @Override
    public int deleteTbReportInFlowById(Long id)
    {
        return tbReportInFlowMapper.deleteTbReportInFlowById(id);
    }
}
